

/* --------------------------
   1) Reset & Root
   -------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html{
  scroll-behavior: smooth;
  scroll-padding: 2rem;
}

body {
  font-family: "Outfit", sans-serif;
  line-height: 1.6;
  color: #333;
}

/* --------------------------
   2) Typography / Headings
   -------------------------- */
h1{
  color: white;
  font-size: 40px;
  font-weight: 600;
}

/* --------------------------
   3) Rulers
   -------------------------- */
#header-ruler{
  background-color: #FFF;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
  margin-top: 15px;
  margin-bottom: 15px;
  border: 1.5px solid #fff;
  border-radius: 2px;
}

hr{
  background-color: #FFF;
  margin-top: 15px;
  margin-bottom: 15px;
  border: 1.5px solid #0784F2;
  border-radius: 2px;
}

/* --------------------------
   4) Layout (.container)
   -------------------------- */
.container {
  display: flex;
  min-height: calc(100vh - 200px);
}

/* --------------------------
   5) Sidebar
   -------------------------- */
.sidebar {
  flex: 0 0 300px;
  background: #0784F2;
  color: white;
  padding: 2rem 1.5rem;
  position: sticky;            
  top:0;
  align-self: flex-start;
  min-height: 100vh
}

.sidebar h2 {
  margin-bottom: 1.5rem;
  font-size: 24px;
  font-weight: 600;
}

/* --------------------------
   6) Heading-stroke helpers
   (visual effect helpers used for layered headings)
   -------------------------- */
.broken {
  -webkit-text-stroke: 5px #0784F2;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.fixed {
  position: relative;
  -webkit-text-stroke: 10px #0784F2;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.fixed span{
  position: absolute;
  left: 0;
  -webkit-text-stroke: 0;
}

.broken-h1 {
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.fixed-h1 {
  position: relative;
  -webkit-text-stroke: 10px #0784F2;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.fixed-h1 span{
  position: absolute;
  left: 0;
  color: white;
}

/* --------------------------
   7) Sidebar links
   -------------------------- */
.sidebar li {
  margin-bottom: 0.5rem;
}

.sidebar a {
  color: #ecf0f1;
  text-decoration: none;
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  transition: background 0.3s;
}

.sidebar a:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* --------------------------
   8) Content column & sections
   -------------------------- */
.content {
  flex: 1;
  padding: 2rem;
  background: #D4EEFB;
}

.content section {
  background: #F1FEFF;
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: relative;
}

/* --------------------------
   9) Hero (#intro)
   -------------------------- */
#intro {
  position: relative;
  overflow: hidden;
  min-height: 320px; 
}

#intro::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("Images/hero-study.jpg");
  background-size: cover; 
  background-position: center center;
  background-repeat: no-repeat;
  filter: brightness(0.39);
  transform: scale(1.08); 
}

#intro > * {
  position: relative;
  z-index: 2;
}

@media (max-width: 900px){
  #intro { min-height: 260px; }
  #intro::before { transform: scale(1.02); filter: brightness(0.39); }
}

@media (max-width: 600px){
  #intro { min-height: 220px; }
  #intro::before { background-position: center top; }
}

/* --------------------------
   10) Headings inside content
   -------------------------- */
.content h2 {
  color: #004887;
  margin-bottom: 1rem;
  font-size: 1.8rem;
  font-weight: 600;
  padding-left: 75px;
  position: relative;
  z-index: 3;
}

code{
  color:#0784F2
}


@media (max-width: 480px) {
  .content pre { padding: 0.5rem; gap: 0.5rem; }
}

/* --------------------------
   11) Section icons
   -------------------------- */
.icon img{
  width: 60px;
  height: auto;
  display: block;
}

.icon {
  position: absolute;
  left: 32px; 
  top: 1.6rem;
  width: 60px; 
  height: auto;
  z-index: 4; 
}

/* --------------------------
   12) Paragraphs & misc
   -------------------------- */
.content p {
  margin-bottom: 1rem;
  color:#004887;
  font-weight:500;
  font-size: 1.1rem;
}

#credit-nook{
  margin-top: 135px;
  margin-bottom: -10px;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

#intro p{
  color:white;
  font-weight: 500;
  font-size: 1.4rem;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.content ul {
  margin-left: 2rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  color:#004887;
}

.bullet-header{
  font-weight: 500;
}

.content li {
  margin-bottom: 0.75rem;
}

/* --------------------------
   13) Mobile header & toggles
   -------------------------- */
.mobile-header {
  display: none;
}

.sidebar-toggle {
  display: none;
}

.close-btn {
  display: none;
}

.mobile-header {
  background: #0784F2;
  color: white;
  padding: 1rem 1.5rem;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 999;
}

.mobile-header h1 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .mobile-header {
    display: flex;
  }

  /* mobile header list: visible on mobile and arranged as 3-up grid */
  .mobile-header ul {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    align-items: start;
  }

  /* tiles: icon above label */
  .mobile-header ul li {
    position: relative;
    padding-top: 52px; 
    text-align: center;
  }

  .mobile-header ul li::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
  }

  .mobile-header a {
    color: #ecf0f1;
    text-decoration: none;
    display: block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background 0.3s;
  }

  .mobile-header ul li:nth-child(1)::before { background-image: url("Images/leaf-icon.png"); }
  .mobile-header ul li:nth-child(2)::before { background-image: url("Images/leaf-icon.png"); }
  .mobile-header ul li:nth-child(3)::before { background-image: url("Images/leaf-icon.png"); }
  .mobile-header ul li:nth-child(4)::before { background-image: url("Images/leaf-icon.png"); }
  .mobile-header ul li:nth-child(5)::before { background-image: url("Images/leaf-icon.png"); }
  .mobile-header ul li:nth-child(6)::before { background-image: url("Images/leaf-icon.png"); }

  .container {
    flex-direction: column;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
  }

  @media (max-width: 480px) {
    .content h2 { padding-left: 72px; font-size: 1.4rem; }
    .icon { left: 16px; top: calc(1.5rem + 0.8rem); width: 40px; }
  }
}

/* --------------------------
   14) Sidebar list icons
   -------------------------- */
.sidebar ul {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

.sidebar ul li {
  position: relative;
  padding-left: 35px; 
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.sidebar ul li::before {
  content: "";
  position: absolute;
  left: 0px; 
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.sidebar ul li:nth-child(1)::before { background-image: url("Images/leaf-icon.png"); }
.sidebar ul li:nth-child(2)::before { background-image: url("Images/leaf-icon.png"); }
.sidebar ul li:nth-child(3)::before { background-image: url("Images/leaf-icon.png"); }
.sidebar ul li:nth-child(4)::before { background-image: url("Images/leaf-icon.png"); }
.sidebar ul li:nth-child(5)::before { background-image: url("Images/leaf-icon.png"); }
.sidebar ul li:nth-child(6)::before { background-image: url("Images/leaf-icon.png"); }

/* --------------------------
   15) Responsive code / pre blocks
   Make <pre><code> blocks flex with surrounding content so the
   code area wraps and grows/shrinks responsively.
   -------------------------- */
  
  
  
.content pre {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: rgba(7,132,242,0.04); 
  overflow: auto; 
  white-space: normal; 

  .content pre code {
  white-space: pre-wrap; 
  word-break: break-word;
  flex: 1 1 auto; 
  color: #0784F2;
  background: transparent; 
}




/* --------------------------
   16) Footer buttons
   -------------------------- */
footer {
  padding: 2rem;
  max-width: calc(100% - 300px);
  margin: 0 auto; 
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}


footer .btn,
footer button {
  font-family: inherit;
  font-size: 1.8rem;    
  font-weight: 600;
  color: #004887;      
  background: #ffffff;  
  border: 2px solid #004887;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

footer .btn + .btn,
footer button + button {
  margin-left: 0.75rem;
}

@media (max-width: 768px) {
  footer { max-width: 100%; padding: 1rem; }
  footer .btn, footer button { font-size: 1.4rem; padding: 0.45rem 0.9rem; }
}
